/*
 * Assertions.cpp
 *
 *  Created on: 8 gru 2013
 *      Author: malwina.kowalczyk
 */

#include "Assertions.hpp"

void assertProfile(dna::profile profile, const char* expectedProfile) {
	std::stringstream str;
	std::list<dna::genotype>::iterator pr;
	for (pr = profile.begin(); pr!= profile.end(); pr++) {
		str << (*pr);
	};
	EXPECT_STREQ(expectedProfile, str.str().c_str()) << "Bad genotypes: " << str.str();
}

void assertVector(std::vector<size_t> vector, const char* expectedVectorAsString) {
	std::stringstream str;
	std::vector<size_t>::iterator pr;
	for (pr = vector.begin(); pr!= vector.end(); pr++) {
		str << (*pr);
	};
	EXPECT_STREQ(expectedVectorAsString, str.str().c_str()) << "Bad genotypes: " << str.str();
}

void assertMixture(std::vector<dna::marker> mix, const char* expectedMixAsString) {
	std::stringstream str;
	std::vector<dna::marker>::iterator pr;
	for (pr = mix.begin(); pr!= mix.end(); pr++) {
		str << (*pr);
	};
	//std::cout<<str<<"\n";
	//std::cout<<expectedMixAsString<<"\n";
	EXPECT_STREQ(expectedMixAsString, str.str().c_str()) << "Bad genotypes: " << str.str();
}
